package org.icy.core.setup.verification;

import java.io.File;

import org.icy.core.setup.VerificationResult;
import org.icy.utils.PathUtils;

public class SettingFileVerification implements Verification {

	@Override
	public VerificationResult verify() {
		String path = PathUtils.getAbsolutePath("/ice.xml");
		File f = new File(path);
		if (!f.canWrite()) {
			return new VerificationResult(false, "The settings file is not writable", "Setting file", "The Icy installer requires that the setting file <i>ice.xml</i> must be writable. The full path of the file is: <i>"+path+"</i>. Please check the permission and continue.");
		}
		return new VerificationResult(true, "Writable", "Setting file", null);
	}

}
